/***********************************************************************
    filename:   AnimationWindowTrans.h
    created:    10/4/2012
    author:     4Ys

    purpose:    Defines class for AlphaTransWindow,  RotateTransWindow 
				and MoveTransWindow objects in UI
*************************************************************************/
#ifndef _AnimationWindowTrans_h_
#define _AnimationWindowTrans_h_

#include "CEGuiSample.h"
#include "CEGUI.h"
#include <string>

class AlphaTransWindow
{
	/*!
	\brief
		One of animations in UI - Fade(Alpha).
	*/
public:
		/* !
		\brief
			Construct the sample of class AlphaTransWindow.

		\param affectedWindow
			- point to the window affected.
			
		\param animation_name
			- a string to represent the prefix of the animation.
		*/
	AlphaTransWindow(CEGUI::Window* affectedWindow,std::string animation_name);

		/* !
		\brief
			Set the window affected as alpha.

		\param affectedWindow
			- point to the window affected.
		*/
	void setAffectedWindow(CEGUI::Window* affectedWindow){_affectedWindow = affectedWindow;}
	
		/* !
		\brief
			Get the previous Window.
		*/
	CEGUI::Window* getPreWindow(){return _affectedWindow;}

		/* !
		\brief
			Run the animation.
		*/
	void start();

private:
		//! A point to the window affected.
	CEGUI::Window* _affectedWindow;
	
		//! A point to type of animation.
	CEGUI::Animation* _animation;
	
		//! A point to instance of animation.
	CEGUI::AnimationInstance* _animationInstance;

		/* !
		\brief
			Construct the sample of class AlphaTransWindow.
		*/
	AlphaTransWindow(){}
};

class RotateTransWindow
{
	/*!
	\brief
		One of animations in UI - Rotate.
	*/
public:
		/* !
		\brief
			Construct the sample of class AlphaTransWindow.

		\param affectedWindow
			- point to the window affected.
			
		\param animation_name
			- a string to represent the prefix of the animation.
		*/
	RotateTransWindow(CEGUI::Window* affectedWindow,std::string animation_name);

		/* !
		\brief
			Set the window affected as rotate.

		\param affectedWindow
			- point to the window affected.
		*/
	void setAffectedWindow(CEGUI::Window* affectedWindow){_affectedWindow = affectedWindow;}
		
		/* !
		\brief
			Get the previous Window.
		*/
	CEGUI::Window* getPreWindow(){return _affectedWindow;}

		/* !
		\brief
			Run the animation.
		*/
	void start();

private:
		//! A point to the window affected.
	CEGUI::Window* _affectedWindow;
	
		//! A point to type of animation.
	CEGUI::Animation* _animation;
	
		//! A point to instance of animation.
	CEGUI::AnimationInstance* _animationInstance;

		/* !
		\brief
			Construct the sample of class AlphaTransWindow.
		*/
	RotateTransWindow(){}
};

class MoveTransWindow
{
	/*!
	\brief
		One of animations in UI - Move.
	*/
public:
		/* !
		\brief
			Construct the sample of class AlphaTransWindow.

		\param affectedWindow
			- point to the window affected.
			
		\param animation_name
			- a string to represent the prefix of the animation.
		*/
	MoveTransWindow(CEGUI::Window* affectedWindow,std::string animation_name);

		/* !
		\brief
			Set the window affected as move.

		\param affectedWindow
			- point to the window affected.
		*/
	void setAffectedWindow(CEGUI::Window* affectedWindow){_affectedWindow = affectedWindow;}
		
		/* !
		\brief
			Get the previous Window.
		*/
	CEGUI::Window* getPreWindow(){return _affectedWindow;}

		/* !
		\brief
			Run the animation.
		*/
	void start();

private:
		//! A point to the window affected.
	CEGUI::Window* _affectedWindow;
	
		//! A point to type of animation.
	CEGUI::Animation* _animation;
	
		//! A point to instance of animation.
	CEGUI::AnimationInstance* _animationInstance;

		/* !
		\brief
			Construct the sample of class AlphaTransWindow.
		*/
	MoveTransWindow(){}
};

#endif